    require"Global"
    

--[[
--     local function  HttpGet()
--         local url = string.format("https://jsonplaceholder.typicode.com/todos?userId=%d",9)
--         local co = xluaUtil.cs_generator(function()
--              local unityWebRequset = UnityWebRequest.Get(url)
--              coroutine.yield(unityWebRequset:SendWebRequest())
--             if (unityWebRequset.result == UnityWebRequest.Result.Success) then
--                print( unityWebRequset.downloadHandler.text);
--                local jsonData= Json.decode(unityWebRequset.downloadHandler.text)

--                --print(jsonData.name .."  :::: ".. jsonData.address.street)
--             else

--             end
--         end)
--         local runner = GameObject.Find("Coroutine_Runner")
--         if not runner then
--             runner = GameObject("Coroutine_Runner")
--             UnityEngine.Object.DontDestroyOnLoad(runner)
--             runner:AddComponent(typeof(Coroutine_Runner))
--         end
--         -- 启动协程
--         runner:GetComponent(typeof(Coroutine_Runner)):StartCoroutine(co)

--     end


--     local function HttpPost()

--         local url = string.format("http://jsonplaceholder.typicode.com/posts")
--         local co = xluaUtil.cs_generator(function()

--   coroutine.yield(WaitForSeconds(1))

--   coroutine.yield(WaitForEndOfFrame())

--             local jsonData = "{\"userId\": 1,\"title\": \"leader\",\"body\": \"sfsdfdsfsdf\"}";
--              local unityWebRequest = UnityWebRequest(url,"POST")
--             unityWebRequest:SetRequestHeader("Content-Type", "application/json");
--             local bodyRaw = {string.byte(jsonData, 1, -1)}-- CS.System.Text.Encoding.UTF8.GetBytes(jsonData);
--             unityWebRequest.uploadHandler =  UploadHandlerRaw(bodyRaw);
--             unityWebRequest.downloadHandler =  DownloadHandlerBuffer();
--           coroutine.yield(unityWebRequest:SendWebRequest())

--             if (unityWebRequest.result == UnityWebRequest.Result.Success) then
--                 print(unityWebRequest.downloadHandler.text);
--             end
--         end)
--         local runner = GameObject.Find("Coroutine_Runner")
--         if not runner then
--             runner = GameObject("Coroutine_Runner")
--             UnityEngine.Object.DontDestroyOnLoad(runner)
--             runner:AddComponent(typeof(Coroutine_Runner))
--         end
--         -- 启动协程
--         runner:GetComponent(typeof(Coroutine_Runner)):StartCoroutine(co)
--     end
]]
    function GameStart(param)

        UIManager:GetInstance():Init()
        SceneMgr:GetInstance():OnChangeScene(1400);
        
        
    end
--射线检测
        -- if Input.GetMouseButtonDown(0) then 
        --     local ray = Camera.main:ScreenPointToRay(Input.mousePosition)
        --     local flag, hitInfo = Physics.Raycast(ray,10000)
        --     if flag then
        --         print(hitInfo.point) 
        --     end
        -- end
    function LuaUpdate()

        SceneMgr:GetInstance():Update(Time.deltaTime)

        
    end

    function LuaLateUpdate()

    
    end

    function LuaFixUpdate()

    end
